<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打开窗口</title>
  <script>
    function f1(){
      window.open();
    }
    function f2(){
      // window可以省略
      // 参数一制定打开页面窗口是谁
      window.open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db")
    }
    function f3(){
    //  参数一指定打开窗口页面是谁
    //   参数二向窗口的名称
    //   参数三窗口大小
      window.open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db","aa","width=400px,height=300px")
    }
    function f4(){
      setInterval(function(){
        window.open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db","aa","width=400px,height=300px")
      },1000)
    }
    function f5(){
    //   open方法存在一个返回值，其返回值既为当前打开的窗口对象
      let win=open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db","aa","width=400px,height=300px")
        win.close();
    }
    function f6(){
      let win=open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db","aa","width=400px,height=300px")
      setTimeout(function(){
        win.close();
      },3000)
    }
    function f7() {
      let t=setInterval(function(){
        open("https://chat.deepseek.com/a/chat/s/31596f49-7be6-4698-9853-9a37c91bc5db","aa","width=400px,height=300px")
      },200)
      let t2=setTimeout(function(){
        clearInterval(t);
      },3000)
      clearInterval(t2);
    }
  </script>
</head>
<body>
<button onclick="f1()">打开一个新标签页</button><br>
<button onclick="f2()">打开一个新窗口</button><br>
<button onclick="f3()">打开一个小窗口</button><br>
<button onclick="f4()">无线打开一个小窗口</button><br>
<button onclick="f5()">打开并关闭一个小窗口</button><br>
<button onclick="f6()">打开三秒后关闭一个小窗口</button><br>
<button onclick="f7()">无限打开一个小窗口,三秒后停止</button><br>

</body>
</html>